package com.sz.demo.promotion;

import com.sz.demo.constant.PromotionEnum;
import java.math.BigDecimal;

/**
 * 满减促销
 * @author Lenovo
 */
public class FullReductionPromotion implements Promotion {
    private PromotionEnum promotionEnum;

    public FullReductionPromotion(PromotionEnum promotionEnum) {
        this.promotionEnum = promotionEnum;
    }

    @Override
    public BigDecimal apply(BigDecimal totalAmount) {
        return promotionEnum.apply(totalAmount);
    }
}